/**
 * Section container
 * Created by li-rz on 16-12-3.
 */

import './PersonalSection.scss'
import React from 'react';
import MoocUtility from '../../../../Base/MoocUtility';


class PersonalSection extends React.Component {
    constructor(props) {
        super(props)
    }

    /**
     *
     * @param props
     * @param except
     * @returns {*|String}
     */
    generateClass (props, except) {
        var mixin_props = {};

        for (let key in props) {
            if (props.hasOwnProperty(key) && !except[key]) {
                mixin_props[key] = props[key];
            }
        }

        return MoocUtility.mixinClass(mixin_props);
    }

    render() {
        return React.createElement('section',
            {className: this.generateClass(this.props, {children: true})},
            this.props.children)
    }
}

PersonalSection.PropTypes = {
    hidden: React.PropTypes.bool
};

PersonalSection.defaultProps = {
    hidden: false
};

PersonalSection.displayName = 'PersonalSection';

export default PersonalSection;